FIG. 1 is a schematic structural diagram of a charger provided by the prior art. As shown in FIG. 1, the charger detects a voltage at two ends of a capacitor C (that is, an output voltage of the charger) by using a voltage sampling feedback unit inside the charger, and then feeds back the detected voltage to a pulse width modulation (PWM) controller after processing by the voltage sampling feedback unit, thereby controlling the output voltage, and maintaining the output voltage of the charger at a voltage (for example, 5 volts (V)) preset by a user. After a terminal is connected to the charger shown in FIG. 1, the terminal may adopt a low drop out regulator (LDO) linear mode or a direct current (DC) switching mode to charge an internal battery of the terminal. In the linear charging mode, during a process of charging the battery of the terminal, a battery voltage of the terminal continuously rises as the charging proceeds. When the battery voltage is at a low level, use of a 5V constant voltage to charge the battery will cause excessive electric energy loss. How to reduce energy consumption of the charger on a basis of improving charging effectiveness is a problem to be solved by persons skilled in the art.